package com.doria.sso.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 加载盐值的类
 */
@Configuration
@PropertySource(value = "classpath:salt.properties")
public class SaltParamConfig {

    @Value("${salt}")
    private String salt;
    @Value("${tokenTimeOut}")
    private Long tokenTimeOut;

    public Long getExpTime() {
        return System.currentTimeMillis()+tokenTimeOut;
    }

    public String getSalt() {
        return salt;
    }

    public Long getTokenTimeOut() {
        return tokenTimeOut;
    }
}
